import 'package:flutter/material.dart';
import 'package:mirror/AppStyle.dart';

class BlindBoxList extends StatefulWidget {
  const BlindBoxList({super.key});

  @override
  State<BlindBoxList> createState() => _BlindBoxListState();
}

class _BlindBoxListState extends State<BlindBoxList> {
  @override
  Widget build(BuildContext context) => ListView.builder(
        itemCount: 50,
        itemBuilder: (BuildContext context, int index) {
          return Padding(
            padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
            child: Container(
              decoration: BoxDecoration(
                  color: Colors.white,
                  borderRadius: BorderRadius.circular(10),
                  boxShadow: Constant.boxShadow),
              padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 20),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Container(
                    height: 200,
                    decoration: const BoxDecoration(
                        color: Colors.white,
                        borderRadius: BorderRadius.all(Radius.circular(10)),
                        image: DecorationImage(
                            image: NetworkImage(
                                "https://picjumbo.com/wp-content/uploads/the-golden-gate-bridge-sunset-1080x720.jpg"),
                            fit: BoxFit.fitWidth)),
                  ),
                  const Padding(
                    padding: EdgeInsets.symmetric(vertical: 10),
                    child: Text(
                      "标题标题标题标题",
                      style: TextStyle(fontWeight: FontWeight.bold),
                    ),
                  ),
                  Row(
                    children: [
                      Container(
                        padding: const EdgeInsets.all(5),
                        decoration: const BoxDecoration(
                            color: Color(0xFFBB933B),
                            borderRadius: BorderRadius.horizontal(
                                left: Radius.circular(2))),
                        child: const Text(
                          "限量",
                          style: TextStyle(fontSize: 10),
                        ),
                      ),
                      Container(
                        padding: const EdgeInsets.all(5),
                        decoration: const BoxDecoration(
                            color: Color(0xFFEEBB4C),
                            borderRadius: BorderRadius.horizontal(
                                right: Radius.circular(2))),
                        child: const Text(
                          "100份",
                          style: TextStyle(fontSize: 10),
                        ),
                      ),
                    ],
                  ),
                  Padding(
                    padding: EdgeInsets.symmetric(vertical: 10),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: [
                        Text(
                          "来源",
                          style: TextStyle(fontSize: 10),
                        ),
                        Text(
                          "￥100",
                          style: TextStyle(
                              fontWeight: FontWeight.bold, fontSize: 20),
                        ),
                      ],
                    ),
                  ),
                ],
              ),
            ),
          );
        },
      );
}
